package com.cjy.threadsynchronization;

public class ExtraPoints implements Runnable{
    private Intendant intendant = new Intendant();
    @Override
    public void run() {
        try {
            while (true){
                intendant.extraPoints((int) (Math.random()*10)+1);
                Thread.sleep(1000);
            }
        }catch (InterruptedException ex){
            ex.printStackTrace();
        }
    }
}
